Skip to content

notification: Keep notifications above modal layers - #3577

Merged
huacnlee merged 5 commits into
longbridge:mainfrom
dux-web:sailry/notification-main-review
Nov 16, 2026
Merged

huacnlee merged 5 commits into
longbridge:mainfrom
dux-web:sailry/notification-main-review

Conversation

@dux-web

@dux-web dux-web commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Notifications raised while a dialog is open must stay visible and usable. Defer the notification stack above the dialog layers, including stacked dialogs, while preserving safe-area insets, sheet offsets, and dialog focus.

The regression opens one and then two real Kit dialogs, raises a notification in each, hovers and clicks its dismiss button, checks the close callback, and verifies that the dialogs and their focus remain intact. The command-host fixture explicitly requests each repaint whose factory counts it asserts; its exact header/footer/item counts, query, and native confirmation assertions remain unchanged.

Public API

None.

Validation

  • Formatting with Rust 1.98.0 and git diff --check passed for the changed files.
  • Current head ece5608b0a4c019e7eb96afdd0f96816efbe3b02 merges upstream 861070bb50573741e17b6cdbb99c00ff1658f687 without rewriting the existing PR history. This includes the upstream scroll-claim test fix from scrollable_mask: Dispatch the overscroll steps of the scroll claim test within one frame #3648, which addresses the previous head's three default-backend CI failures. No additional Base, dependency, or lockfile changes are introduced by this PR.
  • CI for this head is queued or running; its results are pending. It covers the default and GPUI Fast overlay tests, Shell command-host tests, and the existing CI checks.

The interaction tests use headless Kit windows; no native OS-window or pixel verification is claimed. Prepared with AI assistance.

Copy link
Copy Markdown
Member

CI currently fails in GPUI Shell Components: retained_command_typed_entries_query_and_confirm_callbacks_are_native expected one header build after the second draw and got zero. The same test passed on this PR’s base. The log alone does not establish that notification deferral caused it; please investigate or reproduce that failure before landing.

The change also needs a window-level regression for a notification raised while a dialog is open, including stacked dialogs: verify visibility, dismiss-button interaction and unchanged dialog focus. The current source-only validation does not exercise that behavior.

@dux-web
dux-web force-pushed the sailry/notification-main-review branch from 7cca3a8 to bfefc2b Compare October 22, 2026 05:09
@dux-web

dux-web commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto da8b2ba4 and added the requested window regression in bfefc2b9.

I reproduced the Shell failure rather than assuming it was unrelated: latest main with the original fixture passes; adding only notification deferral reproduces the exact second-draw header count of 0 instead of 1. GPUI Fast can reuse a clean retained view on draw(). The fixture now calls Window::refresh() before each repaint it intends to count, including the two refreshed-snapshot repaints. It keeps all exact factory-count, query and native confirm assertions. The full command-host module passes (7 tests).

The new notification test exercises one dialog and then stacked dialogs through the real Kit window, including hover, the actual dismiss button, its close callback and unchanged dialog focus. Without the root-layer fix it fails because modal occlusion prevents the dismiss button becoming visible on hover; with the fix all 8 overlay tests pass on both default GPUI and GPUI Fast 0.1.10. Targeted three-crate Clippy and workspace formatting also pass. These are headless interaction checks; I have not claimed native OS-window or pixel verification.

The PR body contains the exact local validation scope. These changes were prepared with AI assistance.

Final CI update for bfefc2b9: 15 jobs pass, including GPUI Fast on macOS/Linux/Windows, all Shell jobs, lint and the WebView/backend checks. The three default-backend test jobs fail at the same unchanged gpui-base assertion, scrollable_mask::tests::horizontal_scroll_area_claims_only_steps_that_move (0px versus 30px). I checked each failed log: it is the sole failure on each platform. This assertion already fails on the rebased upstream commit da8b2ba4: upstream macOS job, PR macOS job, PR Linux job, PR Windows job. This PR has no changes under crates/base; I have kept the notification fix scoped and left the unrelated Base assertion unchanged.

@cavivie

cavivie commented Oct 28, 2026

Copy link
Copy Markdown

bump

Preserve the notification deferral and dialog interaction regression while retaining upstream safe-inset geometry. Absorb the upstream scroll-claim test correction without changing the PR's scope or dependency selection.

@huacnlee huacnlee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM for the notification-layer fix at ece5608b.

This keeps in-app notifications visible and dismissible above hosted modal dialogs. Deferring the whole notification stack after the dialog layers is a reasonable, scoped fix; there are no public API, dependency, or lockfile changes. I read the earlier review thread and checked the added stacked-dialog/focus regression and the Shell repaint-count adjustment. The latter forces the repaints it counts while preserving the exact factory-count, query, and confirmation assertions.

No blocking findings. Independently verified on Linux:

  • Kit overlay integration tests: 9/9 on default GPUI; 9/9 on GPUI Fast.
  • GPUI Shell command_host tests with GPUI Fast: 8/8, including the previously failing retained-command fixture.
  • Kit/Component and Shell targeted cargo clippy --all-targets -- -D warnings, workspace formatting, and git diff --check: passed. Native verification fixture built successfully.
  • Real Xvfb windows: the merge-base baseline visibly clips the notification behind stacked dialogs; this head shows it fully above them in light/dark themes and at 2× scale. Hover reveals the real close button, clicking it runs the close callback while retaining the dialogs, and Escape then closes only the top dialog. Comparison screenshots and a 2.57-second interaction recording are retained with the review evidence.

All 18 existing CI checks for this head are green. Native macOS/Windows visuals were not independently rerun here. The PR remains a draft.

🤖 Noop (reviewer) · AI agent acting for @huacnlee

@huacnlee
huacnlee marked this pull request as ready for review November 16, 2026 06:38
@huacnlee
huacnlee merged commit f1d1f5a into longbridge:main Nov 16, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants